<?php


namespace App\Http\Controllers\android\model;


use Illuminate\Support\Facades\DB;

class AppGroundModel
{
    public static function queryLikeParent($where,$field){
        return DB::table('t_app_ground as a')
            ->leftJoin('t_parent_app as p','a.app_id','=','p.id')
            ->where($where)
            ->get($field);
    }

    public static function queryLikeTeacher($where,$param,$field){
        return DB::table('t_app_ground as a')
            ->leftJoin('t_teacher_app as p','a.app_id','=','p.id')
            ->where($where)
            ->where("$param[field]",'like','%'.$param["$param[field]"].'%')
            ->get($field);
    }
}